<%@ page contentType="text/html; charset=utf-8" language="java"  %>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="thx" uri="/thx-tags" %>
<%@ taglib prefix="fun" uri="http://java.sun.com/jsp/jstl/functions" %>

<section class="content-header">
	<h1>
		新闻公告<small>栏目管理</small>
	</h1>
	<ol class="breadcrumb">
		<li><a href="#"><i class="fa fa-dashboard"></i> 主页</a></li>
		<li><a href="#">新闻公告</a></li>
		<li class="active">栏目管理</li>
	</ol>
</section>


<!-- Main content -->
<section class="content">
	<div class="row">
		<div class="col-md-12">
		   <div class="box">
		        <div class="box-header with-border">
		           <div class="row">
		           		<form class="search-panel" action="information/column!list.action" name="search-form" result-container=".content-wrapper">
							<input type="text" name="searchName" value="${searchName}" class="form-control" placeholder="请输入栏目名称">
							<button type="button" class="btn btn-primary search-btn"  >搜索</button>
						</form>
		           </div>
		        </div>
		        <div class="box-body no-padding">
		            <div class="row">
		                <div class="col-sm-12">
		                    <table class="table table-bordered">
		                        <tr>
<!-- 		                            <th>
										<button title="全选"
											class="btn btn-default btn-sm checkbox-toggle"
											data-toggle="tooltip" data-placement="left">
											<i class="fa fa-square-o"></i>
										</button>
									</th> -->
									<th>排序</th>
									<th>是否公开</th>
									<th>栏目名称</th>
									<th>栏目描述</th>									
		                            <th>操作</th>
		                        </tr>
								<c:if test="${empty list}">
					                <tr>
					                	<td colspan="5">
					                		暂无数据！
					                	</td>
					                </tr>
					            </c:if>
					            <c:forEach items="${list}" var="e">
								<tr>
									<td></td>
									<td><c:if test="${e.isPublic=='1'}">是</c:if><c:if test="${e.isPublic=='0'}">否</c:if></td>
									<td>${e.columnName}</td>
									<td>${e.columnDesc}</td>
									<td>
										<c:if test="${e.isSystem!='1'}">
										<button type="button"
											title="修改"
											data-toggle="tooltip"
											data-placement="bottom"
											open-url="information/column!input.action?id=${e.columnId}"
											class="btn btn-default btn-sm btn-open-form">
											<i class="fa fa-edit"></i>
										</button>
										<button type="button"
											title="删除"
											data-toggle="tooltip"
											data-placement="bottom"
											do-url="information/column!delete.action?id=${e.columnId}"
											load-url="information/column!list.action" load-container=".content-wrapper"
											confirm-msg="确定要删除吗？"
											class="btn btn-default btn-sm btn-open-confirm-win">
											<i class="fa fa-trash"></i>
										</button>
										</c:if>
									</td>
								</tr>
								</c:forEach>
		                    </table>
		                </div>
		            </div>
		        </div>
		        <!-- /.box-body -->
		        <div class="box-footer">
					 <!--分页区-->
					<div class="pagePanel">
			           	 <thx:pages pageNo="page.curPage" total="page.totalPage"  theme="number">
							<s:param name="searchName" value="searchName"></s:param>
						</thx:pages>
					</div>
					 <!--底部操作区-->
					<div class="handlePanel">
<%-- 						  <thx:privileged id="sys_dict_delMulti">
							 <a title="批量删除" class="a-btn btn-open-confirm-win btn-get-checkbox-ids" href="javascript:void(0);"
								do-url="sys/dictName!delMulti.action?delId="
								load-url="sys/dictName!list.action"
								confirm-msg="确定要删除吗？"
								style="margin-right: 5px"> 
								<span class="fa fa-trash"></span>
								<span class="text">删除</span>
							</a>
				          </thx:privileged> --%>
						  <thx:privileged id="sys_dict_edit">
						   	 <a title="新增栏目" class="a-btn btn-open-form" open-url="information/column!input.action" >
						   	 	<span class="fa fa-plus"></span>
								<span class="text">新增</span>
							 </a>
						  </thx:privileged>
					</div>
				</div>
		    </div>
		</div>
	</div>
</section>

<script>
	require([ 'list', 'thx-page'], function(list, page) {
		list.init();
		page.init();
	});
</script>